<!DOCTYPE html>
<meta charset="UTF-8">
<div style="padding: 10px">
	<a href="javascript:void(0)" data-type="button" onclick="getValue()">GetValue</a>
	<a href="javascript:void(0)" data-type="button" onclick="setValue()">SetValue</a>
	<a href="javascript:void(0)" data-type="button" onclick="disable()">Disable</a>
	<a href="javascript:void(0)" data-type="button" onclick="enable()">Enable</a>
</div>
<div style="padding: 10px; width: 500px;">
	<input id="combogrid_actions" data-type="combogrid" style="width: 250px"
		data-defs="
			panelWidth: 500,border:true,
			idField: 'itemid',ptborder:false,
			textField: 'productname',
			method:'get',url: '${rc.contextPath}/assets/ui/jww/demo/testdata/grid_data1.json',
			columns: [[
				{field:'itemid',title:'ID',width:80},
				{field:'productname',title:'产品名称',width:190},
				{field:'listprice',title:'成本',width:80,align:'right'},
				{field:'unitcost',title:'单价',width:80,align:'right'},
				{field:'attr1',title:'属性',width:200},
				{field:'status',title:'状态',width:60,align:'center'}
			]],
			fitColumns: true
		">
</div>
<script type="text/javascript">
	function getValue() {
	    var val = $('#combogrid_actions').combogrid('getValue');
	    alert(val);
    }
    function setValue() {
	    $('#combogrid_actions').combogrid('setValue', 'ID003');
    }
    function disable() {
	    $('#combogrid_actions').combogrid('disable');
    }
    function enable() {
	    $('#combogrid_actions').combogrid('enable');
    }
</script>
